/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package admin.provider;

import admin.util.UtilEjb;
import ejb.attribute.KscEventJndi;
import ejb.bean.AbstractFacade;
import ejb.bean.ActivityFacade;
import ejb.entity.Activity;


public class ActivityProvider extends WrapperProvider<Activity> {
    public static ActivityProvider getInstance() {
        return ActivityProviderHolder.INSTANCE;
    }

    public ActivityProvider() {
        super(Activity.class);
    }

    @Override
    public AbstractFacade<Activity> getAbstractFacade() {
        return getActivityFacade();
    }

    private ActivityFacade getActivityFacade() {
        return UtilEjb.getInstance().<ActivityFacade>getEJB(KscEventJndi.ACTIVITY_BEAN);
    }

    private static class ActivityProviderHolder {
        private static final ActivityProvider INSTANCE = new ActivityProvider();

        private ActivityProviderHolder() {
        }
    }
}
